import './index.less';

interface PublicItemPropType {
  title: String;
  unit: String;
  count: Number;
}
export default function PublicItem(props: PublicItemPropType) {
  const { title = '', unit = '', count = 0 } = props;
  const namespace = 'public-item';
  return (
    <div className={`${namespace}`}>
      <div className={`${namespace}-top`}>
        <span className={`${namespace}-top-count`}>{count}</span>
        <span className={`${namespace}-top-unit`}>{unit}</span>
      </div>
      <span className={`${namespace}-bottom`}>{title}</span>
    </div>
  );
}
